package src.java.SingleTon;

public class SingletonDemo {
    public static void main(String[] args) {
        Singleton3 instance1 = Singleton3.getInstance();
        Singleton3 instance2 = Singleton3.getInstance();
        System.out.println(instance1);
        System.out.println(instance2);
        System.out.println("__________________");
        Singleton4 singleton1 =  Singleton4.INSTANCE;
        Singleton4 singleton2 =  Singleton4.INSTANCE;
        System.out.println(singleton1.hashCode());
        System.out.println(singleton2.hashCode());
    }
}
